#!/bin/bash

FULL_NAME=@XTL_PACKAGE_NAME@-@XTL_FULL_VERSION@

cd @CMAKE_SOURCE_DIR@
cd ../
rm -rf ./$FULL_NAME
cp -r @CMAKE_SOURCE_DIR@ ./$FULL_NAME
rm -rf ./$FULL_NAME/build
tar -czf ./$FULL_NAME.tar.gz ./$FULL_NAME
rm -rf ./$FULL_NAME
mv ./$FULL_NAME.tar.gz ~/rpm/SOURCES
rpmbuild -bb --sign @CMAKE_CURRENT_BINARY_DIR@/xtl.spec

